<?php
include('../mysqli_connect.php');
$gameId = $_GET['gameId'];

$sql= "select t1.team_name n1,t2.team_name n2 from game g INNER JOIN team t1 on t1.team_id=g.home_team_id INNER JOIN team t2 on t2.team_id=g.guest_team_id where g.game_id=$gameId;";
$res = mysqli_query($dbc, $sql);
if (!$res) {
  $response = array('status' => false, 'message' => mysqli_error($dbc));
  echo json_encode($response);
}

$i = 0;
$res= mysqli_fetch_assoc($res);
$Array = array($res['n1'], $res['n2']);

$response = array('status' => true, 'message' => '获取小组队伍成功', 'data' => $Array);
echo json_encode($response);
